import request from '@/utils/request'

// 查询地域列表
export function listDept(query) {
  return request({
    url: '/business/system/sysOrg/queryList',
    method: 'get',
    params: query
  })
}

// 查询地域列表 -- 去除顶级机构
export function queryOrgTree(query) {
  return request({
    url: '/business/system/sysOrg/queryOrgTree',
    method: 'get',
    params: query
  })
}

// 查询地域详细
export function getDept(params) {
  return request({
    url: '/business/system/sysOrg/getInfo',
    method: 'get',
    params
  })
}

// 新增地域
export function addDept(data) {
  return request({
    url: '/business/system/sysOrg/addOrg',
    method: 'post',
    data: data
  })
}

// 修改地域
export function updateDept(data) {
  return request({
    url: '/business/system/sysOrg/updateOrg',
    method: 'put',
    data: data
  })
}

// 删除地域
export function delDept(params) {
  return request({
    url: '/business/system/sysOrg/deleteOrg' ,
    method: 'delete',
    params
  })
}
